import yaml
import yagmail

import csv


def getyamldata(filepoth):
    with open(filepoth, 'r', encoding='utf-8') as f:
        data = yaml.safe_load(f)
        return data


def getcsvdata(filcsv):
    with open(filcsv, 'r', newline='', encoding='utf-8') as csvfile:
        reder = list(csv.DictReader(csvfile))
        return reder
